/**
 * 
 */
package action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import pojo.Car;
import service.UserService;
import service.impl.UserServiceImpl;

/**
 * @author chenguanshen
 *2016年7月16日
 */
public class UpdateAction extends ActionSupport {
	private Car car = new Car();
	private String type;
	private String color;
	private String username;
	private String description;
	private String remark;
	private UserService userService =new UserServiceImpl();

	public String update(){
		car.setType(type);
		car.setColor(color);
		car.setDescription(description);
		car.setRemark(remark);
		car.setUsername(username);
		car = userService.update(car);
		if(car!=null){
			return "update_success";
		}else{
			return "update_false";
		}
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
